<!DOCTYPE html>
<html>
<meta "charset=utf-8"/>
<title>Insert title here</title>
<script type="text/javascript">
	var base = "${base}/";
</script>
<!--框架必需-->
<script type="text/javascript" src="${base}/scripts/plugins/jquery-1.7.1.js"></script>
<script type="text/javascript" src="${base}/scripts/framework.js"></script>
<script type="text/javascript" src="${base}/scripts/area/area.js"></script>
<link href="${base}/css/import_basic.css" rel="stylesheet" type="text/css"/>
<link href="${base}/scripts/area/area.css" rel="stylesheet" type="text/css"/>
<link href="${base}/css/sky/style.css" rel="stylesheet" type="text/css" />
<link  href="${base}/css/editable.css" rel="stylesheet"  type="text/css"/>
<script type="text/javascript" src="${base}/scripts/text/text-overflow.js"></script>
<body>
<div class="position">
	<div class="center">
	<div class="left">
	<div class="right">
		<span>当前位置：订单管理 >> 新建订单</span>
	</div>
	</div>
	</div>
</div>	
<div id="scrollContent">
	<form action="${base}/admin/order/save.action" method="post" id="orderForm" name="order-form">
	<div class="box1" panelWidth="100%">
			<table class="tableStyle" transMode="true" footer="normal">
			<tr>
				<td>客户昵称：</td><td>
				<input type="hidden" name="order.customerId" id="customerId"/>
				<div class="disabled_text" id="username"></div>
				<input type="button" onclick="openWin()" class="button" value=".."/></td>
				<td>真实姓名：</td><td>
				<div class="disabled_text" id="realName"></div>
				<span class="star">*</span></td>
				<td>收货人：</td><td>
				<input type="text" name="order.consignee" id="consigne" class="text_style"/>
				<span class="star">*</span></td>
				<td>联系电话：</td><td><input type="text" name="order.telephone" id="telephone" class="text_style"/><span class="star">*</span></td>
			</tr>
			<tr>
				<td>Email：</td><td><div class="disabled_text" id="email"></div></td>
				<td>邮编：</td><td><input type="text" name="order.zipCode" class="text_style"/></td>
				<td>会员等级：</td>
				<td><div class="disabled_text" id="credit"></div></td>
				<td>积分：</td>
				<td><div class="disabled_text" id="pointValue"></div></td>
			</tr>
			<tr>
				<td>收货地址：</td>
				<td colspan="1">
					<div id="address" class="address">
						<span id="addressLabel">广东省广州市天河区</span>
						<b class="select-box-icon" id="select-box-icon"></b>
						<div class="addressList">
							<div id="selectProvince" class="select-box">
								<span id="proviceLabel">广东省</span>
								<b class="select-box-icon"></b>
								<div class="select-box-list">
									<table class="select-table" border="0"></table>
								</div>
							</div>
							<div id="selectCity" class="select-box">
								<span id="cityLabel">广州市</span>
								<b class="select-box-icon"></b>
								<div class="select-box-list">
									<table class="select-table" border="0"></table>
								</div>
							</div>
							<div id="selectCounty" class="select-box">
								<span id="countyLabel">天河区</span>
								<b class="select-box-icon"></b>
								<div class="select-box-list">
									<table class="select-table" border="0"></table>
								</div>
							</div>
						</div>
					</div>
				</td>
				<td>街道地址：</td>
				<td colspan="1">
					<input type="text" id="detailAddress" class="text_style" style="width: 250px;"/>
					<input type="hidden" name="order.address" id="orderAddress"/>
				</td>
				<td>成交时间：</td>
				<td colspan="2">
					<input type="text" name="order.createDate" class="date text_style" style="width:150px;" dateFmt="yyyy-MM-dd HH:mm:ss"/>
				</td>
			</tr>
		</table>
		</div>
		<div id="goodsList">
			<table class="formdata tableStyle">
				<tr>
					<th width="4%" class="th-title">序号</th>
					<th width="10%" class="th-title">编号</th>
					<th width="12%" class="th-title">商品名</th>
					<th width="12%" class="th-title">规格</th>
					<th width="5%" class="th-title">单位</th>
					<th width="6%" class="th-title">数量</th>
					<th width="7%" class="th-title">出售价</th>
					<th width="5%" class="th-title">折扣</th>
					<th width="8%" class="th-title">金额</th>
					<th width="7%" class="th-title">抵扣积分</th>
					<th width="7%" class="th-title">最近售价</th>
					<th width="7%" class="th-title">库存数量</th>
					<th width="10%" class="th-title">供应商</th>
				</tr>
				<tr>
					<td><span>1</span><div class="clear-btn">X</div></td>
					<td class="order-no-td">
						<input type="text" class="order-no"/>
						<input type="button" class="order-no-search" value=".."/>
					</td>
					<td>
						<input type="hidden" name="order.goodsNames"/>
						<div class="goods-item"><div>
					</td>
					<td>
						<input type="hidden" name="order.goodsIds"/>
						<div class="goods-item"><div>
					</td>
					<td><div class="goods-item"><div></td>
					<td><input type="text" class="quantity" name="order.quantitys"/></td>
					<td>
						<input type="text" class="unitPrice" name="orderItem.prices"/>
					</td>
					<td><input type="text" class="discount" name="order.discounts"/></td>
					<td><div class="goods-item sum"><div></td>
					<td><input type="text" class="credit"/></td>
					<td><div class="goods-item"><div></td>
					<td>
						<input type="hidden" name="orderItem.stocks"/>
						<div class="goods-item stock"><div>
					</td>
					<td><div class="goods-item"><div></td>
				</tr>
			</table>
		</div>
		<div class="toolBar">
			<input type="hidden" name="order.merchantId" class="merchantId"/>
			<input type="button" class="button" id="new" value="新增"/>
			<input type="button" class="button" id="clear" value="清空"/>
		</div>
		<div class="box1" panelWidth="100%">
		<table class="tableStyle" transMode="true" footer="normal">
		<tr>
			<td>应收邮资：</td>
			<td><input type="text" name="order.postAge" id="postage" class="text_style"/></td>
			<td>优惠券：</td>
			<td>
				<input type="text" class="text_style" name="orderItem.couponNo"/>
				<input type="button" id="coupon" class="button" value="使用"/>
				<input type="button" id="coupon" class="button" value="查看"/>
			</td>
			<td>货款合计：</td>
			<td>
				<span id="total" class="total">0元</span>
			</td>
			<td>应收总款：</td>
			<td>
				<span id="payment" class="payment">0元</span>
			</td>
		</tr>
		<tr>
			<td>兑换积分：</td>
			<td>
				<div class="disabled_text" id="creditNum"></div>
				<input type="hidden" name="orderItem.creditNum"/>
				<input type="button" class="button" value="查看"/>
			</td>
			<td>结算方式：</td>
			<td>
				<select id="settleType" style="width:122px;" name="order.settleId"></select>
			</td>
			<td>收款账户：</td>
			<td>
				<select id="franchiser" style="width:122px;" name="order.franchiserFundId"></select>	
			</td>
			<td>货运方式：</td>
			<td>
				<select id="transportMode" style="width:122px;" name="order.transportId"></select>
			</td>
			</tr>
			<tr>
				<td>发票抬头：</td><td><input type="text" class="text_style"/></td>
				<td>客服备注：</td>
				<td><textarea class="textarea_style" name="order.remark"></textarea></td>
				<td><input type="submit" id="submit" onclick="clearNullData()" class="button" style="height:30px;" value="  提 交  " disabled/></td>
				<td><input type="reset" class="button" style="height:30px;" value="  取 消  "/></td>
				<td><input type="button" class="button" style="height:30px;" value="  导 入  "/></td>
				<td><input type="button" class="button" style="height:30px;" value="  导 出  "/></td>
			</tr>
		</table>
		</div>
		</form>
		<div class="padding_top10">
			<table class="tableStyle" transMode="true">
				<tr>
				</tr>
			</table>
		</div> 
	</div>
</body>
<script type="text/javascript" src="${base}/js/order.js"></script>
<!--时间控件-->
<script src="${base}/scripts/form/datePicker/WdatePicker.js" type="text/javascript"></script>
<!--下拉列表框美化-->
<script src="${base}/scripts/form/select2/select2.js" type="text/javascript"></script>
<link href="${base}/scripts/form/select2/select2.css" rel="stylesheet" type="text/css"/>
<script src="${base}/js/obtain-order-item.js" type="text/javascript"></script>
<!--引入弹窗组件-->
<script type="text/javascript" src="${base}/scripts/attention/zDialog/zDrag.js"></script>
<script type="text/javascript" src="${base}/scripts/attention/zDialog/zDialog.js"></script>
<script type="text/javascript">
function openWin(){
	var diag = new top.Dialog();
	diag.Title = "查询客户";
	diag.URL = "${base}/admin/customer/list.action";
	diag.Width=1200;
	diag.Height=600;
	diag.CancelEvent = function(){
		diag.innerFrame.contentWindow.location.reload();
		diag.close();
	};
	diag.show();
}
$(function() {
	$("#detailAddress").blur(function() {
		var addressLabel = $("#addressLabel").text();
		var detailAddress = $("#detailAddress").val();
		var address = addressLabel + " " + detailAddress;
		$("#orderAddress").val(address);
	});
});
</script>
</html>